﻿<UserControl x:Class="PM.UI.BugManager.AllBugQuery"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    <UserControl.Background>
        <ImageBrush ImageSource="/PM.UI;Component/Images/BackGroundImage.png"></ImageBrush>
    </UserControl.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="80"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <StackPanel Orientation="Horizontal">
                <Image Source="/PM.UI;Component/Images/project.png" Height="32" Width="32" Margin="10,0,0,0" HorizontalAlignment="Left"></Image>
                <TextBlock TextAlignment="Left" Margin="10,0,0,0" FontSize="16" Foreground="White"  VerticalAlignment="Center"> 所有Bug</TextBlock>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1">
            <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Horizontal">
                <Label VerticalAlignment="Center" FontSize="16" Foreground="White">优先级：</Label>
                <ComboBox Width="150" Height="30" FontSize="16" Foreground="White"></ComboBox>
                <Label VerticalAlignment="Center" FontSize="16" Foreground="White">状态：</Label>
                <ComboBox Width="150" Height="30" FontSize="16" Foreground="White"></ComboBox>
                <Label VerticalAlignment="Center" FontSize="16" Foreground="White">处理人：</Label>
                <TextBox Width="150" Height="30" FontSize="16" Foreground="White"></TextBox>
            </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Label VerticalAlignment="Center" FontSize="16" Foreground="White"> 分配人：</Label>
                    <ComboBox Width="150" Height="30" FontSize="16" Foreground="White"></ComboBox>
                    <Label VerticalAlignment="Center" FontSize="16" Foreground="White">模块：</Label>
                    <ComboBox Width="150" Height="30" FontSize="16" Foreground="White"></ComboBox>
                    <Label VerticalAlignment="Center" FontSize="16" Foreground="White">关键字：</Label>
                    <TextBox Width="150" Height="30" FontSize="16" Foreground="White"></TextBox>
                    <Button Width="100" Height="40" Margin="30,0,0,0" FontSize="16" Background="SkyBlue" Foreground="White" Content="搜索">

                    </Button>
                </StackPanel>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="2">
            <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                    <Image Source="/PM.UI;Component/Images/bug_default.png" Margin="10,0,0,0" Height="32" Width="32"  HorizontalAlignment="Left"></Image>
                    <TextBlock TextAlignment="Left" Margin="10,0,0,0" FontSize="16" Foreground="White"  VerticalAlignment="Center">Bug列表信息</TextBlock>
                    <Image Source="/PM.UI;Component/Images/submitBug.png" Margin="10,0,0,0" Height="32" Width="32"  HorizontalAlignment="Right"></Image>
                </StackPanel>
                <StackPanel>
                    <DataGrid Name="BugDataGridViewNew" RowHeaderWidth="27" AutoGenerateColumns="False" ColumnHeaderHeight="30" RowHeight="27" IsReadOnly="True" HorizontalGridLinesBrush="Cyan" 
                                 VerticalGridLinesBrush="#FFE0EAF6" BorderBrush="AliceBlue"  HeadersVisibility="Column" Background="Transparent"
                                FontFamily="微软雅黑" FontSize="14"   SelectionUnit="FullRow" SelectionMode="Single" SelectionChanged="DeductionDataGridView_SelectionChanged" Opacity="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="None" >
                        <!--给整个表单元格添加颜色开始-->
                        <DataGrid.CellStyle>
                            <Style TargetType="DataGridCell">
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="Background" Value="SkyBlue"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.CellStyle>
                        <!--给整个表单元格添加颜色结束-->

                        <!--给整个表行添加颜色开始-->
                        <DataGrid.RowStyle >
                            <Style TargetType="DataGridRow">
                                <Setter Property="Background" Value="Transparent"/>
                                <Setter Property="Foreground" Value="White"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <!--当鼠标经过时 改变颜色-->
                                        <!--<Setter Property="Background" Value="SkyBlue"/>-->
                                        <Setter Property="Foreground" Value="SkyBlue"/>
                                    </Trigger>
                                    <Trigger Property="IsSelected" Value="True">
                                        <!--<Setter Property="Background" Value="LightGray"/>-->
                                        <Setter Property="Foreground" Value="Red"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.RowStyle>
                        <!--给整个表行添加颜色结束-->

                        <!--给整个表头添加颜色开始-->
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="DataGridColumnHeader">
                                <Setter Property="Background">
                                    <Setter.Value>
                                        <ImageBrush ImageSource="/PM.UI;Component/Images/Deduction-12.png"></ImageBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Foreground" Value="White"/>
                                <Setter Property="FontSize" Value="14" />
                                <Setter Property="FontFamily" Value="微软雅黑"/>
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                        <!--给整个表头添加颜色结束-->

                        <DataGrid.Columns>
                            <DataGridTextColumn Header=""  MinWidth="20" />
                            <DataGridTextColumn Header="标题" Width="*" Binding="{Binding ID}"/>
                            <DataGridTextColumn Header="优先级" MinWidth="70" Binding="{Binding QuestionType}"/>
                            <DataGridTextColumn Header="状态" MinWidth="70" Binding="{Binding QuestionTitle}"/>
                            <DataGridTextColumn Header="处理人" MinWidth="120" Binding="{Binding QuestionTitle}"/>
                            <DataGridTextColumn Header="模块" MinWidth="120" Binding="{Binding QuestionTitle}"/>
                            <DataGridTextColumn Header="版本" MinWidth="120" Binding="{Binding QuestionTitle}"/>
                            <DataGridTextColumn Header="日期" MinWidth="120" Binding="{Binding QuestionTitle}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </StackPanel>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
